import request from '@/utils/request'
// import { fround } from 'core-js/fn/number'
// import { fround } from 'core-js/fn/number'

// 查询
export function getbotanyTypeList(data) {
  return request({
    url: `/wikiCropType/query?limit=${data.limit}&page=${data.page}&keyword=${data.keyword}&wikiCategoryId=${data.wikiCategoryId}`,
    method: 'get'
  })
}

// 新增
export function addbotanyTypeList(data) {
  return request({
    url: `/wikiCropType/insert?wikiCategoryId=${data.wikiCategoryId}&wikiCropTypeName=${data.wikiCropTypeName}`,
    method: 'post'
  })
}

// 删除
export function deletebotanyTypeList(data) {
  return request({
    url: `/wikiCropType/delete/${data.wikiCropTypeId}`,
    method: 'delete'
  })
}

// 批量删除
export function deletebotanyTypeLists(data) {
  return request({
    url: `/wikiCropType/deletes?ids%5B%5D=${data.item}`,
    method: 'delete'
  }
  )
}

// 更新
export function updatebotanyTypeList(data) {
  return request({
    url: '/wikiCropType/update',
    method: 'put',
    data
  })
}

// 存在查询

export function getallbotanyTypeList() {
  return request({
    url: '/wikiCropType/queryWikiCropTypes',
    method: 'get'
  })
}
